﻿using Avalonia;
using Avalonia.Styling;
using CommunityToolkit.Mvvm.Input;

namespace myTool.ViewModels;

public partial class MainWindowViewModel : ViewModelBase
{
    public string Greeting { get; } = "Welcome to Avalonia!";


    [RelayCommand]
    private void ChangeTheme()
    {
        if (Application.Current is null)
        {
            return;
        }

        Application.Current.RequestedThemeVariant = Application.Current.RequestedThemeVariant == ThemeVariant.Default
            ? ThemeVariant.Dark
            : ThemeVariant.Default;
    }

}
